package com.appkubes.fintech.admin.application.credit.service;


import com.appkubes.fintech.admin.application.credit.dao.CreditDao;
import com.appkubes.fintech.admin.application.user.entity.vo.UserApprovalVO;
import com.appkubes.fintech.common.exption.BusinessException;
import com.appkubes.fintech.common.response.Response;
import com.appkubes.fintech.core.po.FintechCredit;

/**
 * @Author: Rongjie
 * @Date: 2020-01-05
 * @Description: 信用租赁服务
 */
public interface CreditService {

    CreditDao getCreditDao();


    /**
     * 获取用户的信用额度
     *
     * @param userKey
     * @return
     */
    FintechCredit getCredit(String userKey);

    /**
     * 扣除用户额度
     *
     * @param userKey
     * @param creditAmount : 负数为减少额度
     * @return
     */
    FintechCredit addCredit(String userKey, Long creditAmount) throws BusinessException;


    public Response<FintechCredit> initCredit(String userKey, Integer amt);
    /**
     * @Date 2020/2/17 12:26 额度冻结
     * @Author XQC
     * @Description
     */
    public Response<FintechCredit> frozenCredit(String userKey, Integer amt);

    public Response<FintechCredit> unfrozenCredit(String userKey, Integer amt);

    public Response<FintechCredit> unOutfrozenCredit(String userKey, Integer amt);

    public Response<FintechCredit> recoverCredit(String userKey, Integer amt);
    public Response editCredit(UserApprovalVO vo);
    public Response deleteUserInfo(String userKey);
    public Response revertUser(String userKey);
    public Response deleteOrder(String userKey,String rentOrderNumber);
}
